package com.grass.p019lv.viewmodel;

import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.androidx.p013lv.base.http.BaseRes;
import com.androidx.p013lv.base.http.HttpUtils;
import com.androidx.p013lv.base.http.UrlManager;
import com.androidx.p013lv.base.http.callback.HttpCallback;
import com.grass.p019lv.bean.FansOrFollowBean;
import com.grass.p019lv.bean.MessageDynamicComment;
import com.grass.p019lv.bean.MessageDynamicLike;
import com.grass.p019lv.bean.NoticeListBean;

/* renamed from: com.grass.lv.viewmodel.MessageModel */
public class MessageModel extends ViewModel {
    private MutableLiveData<BaseRes<MessageDynamicComment>> dynamicCommentLive;
    private MutableLiveData<BaseRes<MessageDynamicLike>> dynamicLikeLive;
    private MutableLiveData<BaseRes<FansOrFollowBean>> fansLive;
    private MutableLiveData<BaseRes<NoticeListBean>> noticeLive;

    public MutableLiveData<BaseRes<MessageDynamicLike>> getDynamicLikeLive() {
        if (this.dynamicLikeLive == null) {
            this.dynamicLikeLive = new MutableLiveData<>();
        }
        return this.dynamicLikeLive;
    }

    public MutableLiveData<BaseRes<MessageDynamicComment>> getDynamicCommentLive() {
        if (this.dynamicCommentLive == null) {
            this.dynamicCommentLive = new MutableLiveData<>();
        }
        return this.dynamicCommentLive;
    }

    public MutableLiveData<BaseRes<NoticeListBean>> getNoticeLive() {
        if (this.noticeLive == null) {
            this.noticeLive = new MutableLiveData<>();
        }
        return this.noticeLive;
    }

    public MutableLiveData<BaseRes<FansOrFollowBean>> getFansLive() {
        if (this.fansLive == null) {
            this.fansLive = new MutableLiveData<>();
        }
        return this.fansLive;
    }

    public void userFansList(int i, int i2) {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().userFansList(i, i2), new HttpCallback<BaseRes<FansOrFollowBean>>("userFansList") {
            /* class com.grass.p019lv.viewmodel.MessageModel.C32431 */

            public void onLvSuccess(BaseRes<FansOrFollowBean> baseRes) {
                MessageModel.this.fansLive.setValue(baseRes);
            }
        });
    }

    public void notificationList(int i) {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().notificationList(i), new HttpCallback<BaseRes<NoticeListBean>>("notificationList") {
            /* class com.grass.p019lv.viewmodel.MessageModel.C32442 */

            public void onLvSuccess(BaseRes<NoticeListBean> baseRes) {
                MessageModel.this.noticeLive.setValue(baseRes);
            }
        });
    }

    public void dynamicCommentLive(int i) {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().dynamicCommentMessage(i), new HttpCallback<BaseRes<MessageDynamicComment>>("dynamicCommentMessage") {
            /* class com.grass.p019lv.viewmodel.MessageModel.C32453 */

            public void onLvSuccess(BaseRes<MessageDynamicComment> baseRes) {
                MessageModel.this.dynamicCommentLive.setValue(baseRes);
            }
        });
    }

    public void dynamicLikeLive(int i) {
        HttpUtils.getInsatance().get(UrlManager.getInsatance().dynamicLikeMessage(i), new HttpCallback<BaseRes<MessageDynamicLike>>("dynamicLikeMessage") {
            /* class com.grass.p019lv.viewmodel.MessageModel.C32464 */

            public void onLvSuccess(BaseRes<MessageDynamicLike> baseRes) {
                MessageModel.this.dynamicLikeLive.setValue(baseRes);
            }
        });
    }

    public void cancelHttp() {
        HttpUtils.getInsatance().cancelTag("userFansList");
        HttpUtils.getInsatance().cancelTag("notificationList");
        HttpUtils.getInsatance().cancelTag("dynamicCommentMessage");
        HttpUtils.getInsatance().cancelTag("dynamicLikeMessage");
    }
}
